//
// Created by liushuai on 2021/1/16.
//

#include "longestPalindromeSubseq.h"
int longestPalindromeSubseq(std::string& s){
    int num_size = s.size();
    std::vector<int> col(s.size(),0);
    std::vector<std::vector<int>> dp(s.size(),col);
    for(int start=0;start<num_size;start++){
        for(int end=num_size-1;end>0;end--){
            if(start==end)
                dp[start][end] = 1;
            else
                dp[start][end] = std::max(dp[start+1][end-1],dp[start][end-1]);
        }
    }
}